<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>ecmascript方法时都是按值传递</title>
	</head>
	<body>
		12
	</body>
	<script type="text/javascript">
		function box (obj){
			obj.name='值';
			
		var obj = new Object();
				obj.name='引用';
		}
		var obj = new Object();
		box(obj);//传递引用参数，也是按值传递
		alert(obj.name);//值
	</script>
</html>
